using System;
using System.Collections.Generic;
using System.Text;

namespace Sio.Mdm.Server.Administration
{
    /// <summary>
    /// Declarations for remote server administration
    /// </summary>
    public interface IServerAdministration
    {
        string[] AvailableCommands { get; }
        string GetCommandDescription(string commandName);

        bool Login(string userName, string password);
        void Logout();

        string ExecuteCommand(IServerCommand command);
        string ExecuteCommand(string commandLine);        

        /// <summary>
        /// Register additional server command
        /// </summary>
        /// <param name="command">Command implementation</param>
        /// <seealso cref="IServerCommand"/>
        void RegisterCommand(IServerCommand command);
        /// <summary>
        /// Register additional server command
        /// </summary>
        /// <param name="implementingType">Type that implements <see cref="IServerCommand"/></param>
        /// <seealso cref="IServerCommand"/>
        void RegisterCommand(Type implementingType);
        /// <summary>
        /// Register additional server command
        /// </summary>
        /// <param name="implementingTypeName">Full assembly type name</param>
        void RegisterCommand(string implementingTypeName);
    }
}
